const routes = [
  {
    path: '/',
    name: 'login',
    redirect: '/login'
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/index.vue')
  },
  // 注册
  {
    path: '/userRegister',
    name: 'userRegister',
    component: () => import('@/views/userRegister/index.vue')
  },
  // 首页
  {
    path: '/home',
    name: '',
    redirect: '/welcome',
    component: () => import('../views/home/index.vue'),
    children: [
      { path: '/welcome', component: () => import('../views/home/welcome.vue') },
      {
        path: '/projectManagement',
        name: '管理列表',
        component: () => import('../views/projectManagement/projectManagement.vue')
      },
      {
        path: '/plan',
        name: 'BIM模型管理列表',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/BIM/plan.vue')
      }, // BIM管理-BIM列表
      {
        path: '/orderManagementList',
        name: '订单管理列表',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/orderManagement/orderManagementList.vue')
      }, // 订单管理-订单管理列表
      {
        path: '/productionManagementList',
        name: '排产计划',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/productionManagement/productionManagementList.vue')
      }, // 排产管理-排产计划
      {
        path: '/technologyprocesslist',
        name: '生产计划',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/productionManagement/technologyprocesslist.vue')
      }, // 排产管理-生产计划
      {
        path: '/taskOrders',
        name: '生产任务单',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/productionManagement/taskOrders.vue')
      }, // 排产管理-生产任务单
      {
        path: '/inspection',
        name: '生产计划',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/productionProcessManagement/inspection.vue')
      }, // 生产过程管理-生产计划
      {
        path: '/taskList',
        name: '生产任务',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/productionProcessManagement/taskList.vue')
      }, // 生产过程管理-生产任务
      {
        path: '/processUpdate',
        name: '过程更新',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/productionProcessManagement/processUpdate.vue')
      }, // 生产过程管理-过程更新
      {
        path: '/materiaList',
        name: '资料管理列表',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/materiaManagement/materiaList.vue')
      }, // 资料管理-资料管理列表
      {
        path: '/processList',
        name: '工艺流程',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/processingProductionManagement/processList.vue')
      }, // 工艺与产线-工艺流程
      {
        path: '/processManege',
        name: '工序管理',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/processingProductionManagement/processManege.vue')
      }, // 工艺与产线-工序管理
      {
        path: '/sys_empList',
        name: '人员管理',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/systemManage/empList.vue')
      }, // 平台管理-人员管理
      {
        path: '/sys_positionList',
        name: '职务管理',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/systemManage/positionList.vue')
      }, // 平台管理-职务管理
      {
        path: '/sys_orgList',
        name: '部门管理',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/systemManage/orgList.vue')
      }, // 平台管理-部门管理
      {
        path: '/sys_companyList',
        name: '企业管理',
        component: () => import('../views/systemManage/companyList.vue')
      }, // 平台管理-企业管理
      {
        path: '/sys_processList',
        name: '流程管理',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/systemManage/sysProcessList.vue')
      }, // 平台管理-流程管理
      {
        path: '/detail',
        name: '详情页面',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/projectManagement/detail.vue')
      }, // 平台管理-流程管理
      {
        path: '/process_detail',
        name: '过程更新管理',
        meta: {
          keepAlive: true
        },
        component: () => import('../views/productionProcessManagement/processDetail.vue')
      } // 生产过程管理-过程更新管理
    ]
  },

  {
    path: '/:catchAll(.*)',
    name: 'error',
    component: () => import('../views/other/error.vue')
  }
]

export default routes
